package com.xiaokai.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.xiaokai.dao.StudentMapper;
import com.xiaokai.entity.Student;

@Service
public class StudentServiceImpl implements StudentService{
	
		@Autowired
		private StudentMapper dao;

		@Override
		public PageInfo<Student> list(Integer pageNum, Integer pageSize) {
			PageHelper.startPage(pageNum, pageSize);
			
			List<Student> list = dao.list();
			
			return new PageInfo<Student>(list);
		}

	
}
